package com.mybatis.util;

import com.alibaba.fastjson.JSONObject;

import java.security.interfaces.RSAPublicKey;

/**
 * @author liuxiaoding
 * @Date 2020/1/9
 **/
public class RSAEncryptTest {
    public static String publicKey="0334e67af0c2525914908ea4c1c0ed1d9decdaa5ba39d57fda108704d2a6fa8275";

    public static void main(String[] args) throws Exception {
        RSAPublicKey rsaPublicKey=RSAEncrypt.loadPublicKeyByStr(publicKey);
        byte[] bytes=RSAEncrypt.decrypt(rsaPublicKey,"Hwo5Jx+A1zkcapzFCWciz21A1NabPOBhOCO5C05NZwTXIf7ON7dM6AgdEwplO3sHQFxgy0HfQfpSgbahy8Jzxl8=".getBytes());
        System.out.println(new String(bytes));
    }
}
